package com.esri.core.internal.tasks.d;

import com.esri.core.internal.io.handler.h;
import com.esri.core.internal.tasks.TaskListener;
import com.esri.core.io.UserCredentials;
import com.esri.core.tasks.na.ServiceAreaResult;
import java.util.HashMap;
import org.codehaus.jackson.JsonParser;

/* loaded from: classes.dex */
public class f extends com.esri.core.internal.tasks.d<ServiceAreaResult> {
    private static final long serialVersionUID = 1;

    public f(g gVar, String str, UserCredentials userCredentials) {
        super(gVar, str, userCredentials);
    }

    public f(g gVar, String str, UserCredentials userCredentials, TaskListener<ServiceAreaResult> taskListener) {
        super(gVar, str, userCredentials, taskListener);
    }

    public g a() throws Exception {
        HashMap hashMap = new HashMap();
        hashMap.put("f", "json");
        JsonParser jsonParser = null;
        try {
            jsonParser = h.a(this.serviceURL, hashMap, getServiceCredentials());
            return g.a(jsonParser);
        } finally {
            if (jsonParser != null) {
                jsonParser.close();
            }
        }
    }

    @Override // com.esri.core.internal.tasks.a
    /* renamed from: b */
    public ServiceAreaResult execute() throws Exception {
        JsonParser jsonParser = null;
        try {
            jsonParser = h.a(this.serviceURL + "/solveServiceArea", this.actionInput.generateRequestParams(), getServiceCredentials(), true);
            return ServiceAreaResult.fromJson(jsonParser);
        } finally {
            if (jsonParser != null) {
                jsonParser.close();
            }
        }
    }
}
